.class public Lcom/waiqin365/lightapp/im/b/d;
.super Landroid/os/AsyncTask;


# instance fields
.field a:Ljava/lang/String;

.field b:Ljava/lang/String;

.field c:Landroid/app/Activity;

.field d:Lcom/hyphenate/chat/EMMessage;

.field e:Landroid/widget/BaseAdapter;

.field private f:Landroid/widget/ImageView;


# direct methods
.method public constructor <init>()V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->f:Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->a:Ljava/lang/String;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->b:Ljava/lang/String;

    return-void
.end method


# virtual methods
.method protected varargs a([Ljava/lang/Object;)Landroid/graphics/Bitmap;
    .locals 3

    const/16 v2, 0x78

    const/4 v0, 0x0

    aget-object v0, p1, v0

    check-cast v0, Ljava/lang/String;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->a:Ljava/lang/String;

    const/4 v0, 0x1

    aget-object v0, p1, v0

    check-cast v0, Ljava/lang/String;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->b:Ljava/lang/String;

    const/4 v0, 0x2

    aget-object v0, p1, v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->f:Landroid/widget/ImageView;

    const/4 v0, 0x3

    aget-object v0, p1, v0

    check-cast v0, Landroid/app/Activity;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->c:Landroid/app/Activity;

    const/4 v0, 0x4

    aget-object v0, p1, v0

    check-cast v0, Lcom/hyphenate/chat/EMMessage;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->d:Lcom/hyphenate/chat/EMMessage;

    const/4 v0, 0x5

    aget-object v0, p1, v0

    check-cast v0, Landroid/widget/BaseAdapter;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->e:Landroid/widget/BaseAdapter;

    new-instance v0, Ljava/io/File;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/b/d;->a:Ljava/lang/String;

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->a:Ljava/lang/String;

    invoke-static {v0, v2, v2}, Lcom/hyphenate/util/ImageUtils;->decodeScaleImage(Ljava/lang/String;II)Landroid/graphics/Bitmap;

    move-result-object v0

    :goto_0
    return-object v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method protected a(Landroid/graphics/Bitmap;)V
    .locals 2

    invoke-super {p0, p1}, Landroid/os/AsyncTask;->onPostExecute(Ljava/lang/Object;)V

    if-eqz p1, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->f:Landroid/widget/ImageView;

    invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    invoke-static {}, Lcom/waiqin365/lightapp/im/utils/i;->a()Lcom/waiqin365/lightapp/im/utils/i;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/b/d;->a:Ljava/lang/String;

    invoke-virtual {v0, v1, p1}, Lcom/waiqin365/lightapp/im/utils/i;->a(Ljava/lang/String;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->f:Landroid/widget/ImageView;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setClickable(Z)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->f:Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/b/d;->a:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setTag(Ljava/lang/Object;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->f:Landroid/widget/ImageView;

    new-instance v1, Lcom/waiqin365/lightapp/im/b/e;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/b/e;-><init>(Lcom/waiqin365/lightapp/im/b/d;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->d:Lcom/hyphenate/chat/EMMessage;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->status()Lcom/hyphenate/chat/EMMessage$Status;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Status;->FAIL:Lcom/hyphenate/chat/EMMessage$Status;

    if-eq v0, v1, :cond_2

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->d:Lcom/hyphenate/chat/EMMessage;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_0

    :cond_2
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/b/d;->c:Landroid/app/Activity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/utils/b;->a(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_0

    new-instance v0, Lcom/waiqin365/lightapp/im/b/f;

    invoke-direct {v0, p0}, Lcom/waiqin365/lightapp/im/b/f;-><init>(Lcom/waiqin365/lightapp/im/b/d;)V

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/Void;

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/im/b/f;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    goto :goto_0
.end method

.method protected synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1

    invoke-virtual {p0, p1}, Lcom/waiqin365/lightapp/im/b/d;->a([Ljava/lang/Object;)Landroid/graphics/Bitmap;

    move-result-object v0

    return-object v0
.end method

.method protected synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0

    check-cast p1, Landroid/graphics/Bitmap;

    invoke-virtual {p0, p1}, Lcom/waiqin365/lightapp/im/b/d;->a(Landroid/graphics/Bitmap;)V

    return-void
.end method
